﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace RequestCenterMgr.Mini
{
    public partial class IVRszxh : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    string strlinkid = string.Empty,//唯一标识，天津炎黄
                        strspnum = string.Empty,//通道号码
                        strmobile = string.Empty,//手机号
                        strbegintime = string.Empty,//开始时间 
                        strivrtime = string.Empty,//通话时间
                        strfeecode = string.Empty;//资费 100 表示1.00元

                    if (Request.QueryString["linkid"] != null)
                        strlinkid = Request.QueryString["linkid"].ToString();
                    if (Request.QueryString["spnum"] != null)
                        strspnum = Request.QueryString["spnum"].ToString();
                    if (Request.QueryString["mobile"] != null)
                        strmobile = Request.QueryString["mobile"].ToString();
                    //if (Request.QueryString["begintime"] != null)
                    //    strbegintime = Request.QueryString["begintime"].ToString();
                    if (Request.QueryString["min"] != null)
                        strivrtime = Request.QueryString["min"].ToString();
                    //if (Request.QueryString["feecode"] != null)
                    //    strfeecode = Request.QueryString["feecode"].ToString();

                    if (!string.IsNullOrEmpty(strlinkid) && !string.IsNullOrEmpty(strspnum) && !string.IsNullOrEmpty(strmobile))
                    {
                        MM.DBUtility.BLSqlDataSPIO.IVRReceiveData(strlinkid, strspnum, strmobile, strbegintime, strivrtime, strfeecode);
                        Response.Write("OK");
                    }
                    else Response.Write("ParamsError");
                }
                catch (Exception ex)
                {
                    MM.Common.LogHelp.WriteLogInfo(ex.ToString());
                    Response.Write("ERROR");
                }
            }
        }
    }
}
